package com.caisejingyu.whales.home.devices.printer;

/**
 * Created by fengxing on 2017/5/19.
 */

public class PrintUtils {

    /**
     * 取消打印任务
     */
    public static void cancelPrint() {
        System.out.println(Shell.exec("/system/cups/bin/cancel -a"));
    }

    /**
     * 重启cupsd（打印服务）
     */
    public static void restartCupsd() {
        Shell.exec("ps | grep /system/cups/");
        Shell.exec("stop cupsd");
        Shell.exec("start cupsd");
        Shell.exec("ps | grep /system/cups/");
    }
}
